<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.wing.common.util.*,java.util.*"%>
<%@ include file="/pub/includ.jsp"%>
<%
	response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1 
	response.setHeader("Pragma", "no-cache"); //HTTP 1.0 
	response.setDateHeader("Expires", 0);
	List funs = (List)request.getAttribute("funs");
%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>模块配置主页</title>
		<style type="text/css">
		<!--
		body {	margin: 0px; font-size:12px; color:#666;}
		.left{ float:left;}
		ul,li{ margin:0; padding:0;}
		li{ list-style:none;}
		.TextBox{ width:100%; height:480px; margin:0 auto; background:#f7fcfe;}
		.TextTitleBox{ width:20%; height:441px; background:#cff1ff; float:left;}
		.TextTitleBox ul{ margin-top:30px; width:180px;}
		.TextTitleBox li{ height:25px; width:120px; background:url(<%=path %>/resources/skins/default/images/texttitle_bg.gif) no-repeat; padding-bottom:1px; text-align:center; }
		.TextTitleBox a{ color:#fff; line-height:25px;text-decoration:none;}
		.TextTitleBox a:visited{ color:#fff;text-decoration:none;}
		.TextTitleBox a:hover{color:red;text-decoration:none; }
		.TextInput{  width:76%; height:426px; border:1px solid #d6f5ff; margin:10px; float:left; background:#fff;}
		-->
		</style>
	</head>
	<body style="margin: 0;">
		<div class="TextBox">
			<div class="TextTitleBox">
		    	<ul>
		        	<a href="javascript:changePIframe('article');" onclick=""><li>文章设置</li></a>
		            <a href="javascript:changePIframe('menu');" onclick=""><li>菜单设置</li></a>
		            <a href="javascript:changePIframe('product');" onclick=""><li>产品设置</li></a>
		            <a href="javascript:changePIframe('content');" onclick=""><li>文本设置</li></a>
		            <a href="javascript:changePIframe('pictrue');" onclick=""><li>图片设置</li></a>
		            <%
		            for(int i=0;i<funs.size();i++){ 
		            Map cf = (Map)funs.get(i); 
		            %>
		            	<a href="javascript:changePIframe('<%=cf.get("fun_code") %>');" onclick=""><li><%=cf.get("name") %></li></a>
		            <%} %>
		        </ul>
		    </div>
			<div class="TextInput">
				<iframe id="portlet_ifrmMain" name="portlet_ifrmMain" width="100%"
						scrolling="no" height="100%" frameborder="0"
						src="<%=request.getContextPath()%>/cms/portlet/toForm/0?portletype=article&horderChannelId=${param.horderChannelId}&placeholderId=${param.placeholderId}"></iframe>    
			</div>
		</div>
		<script>	
				function changePIframe(flag){
					var basePortletUrl = "<%=request.getContextPath()%>/cms/portlet/toForm/0?portletype="+flag+"&horderChannelId=${param.horderChannelId}&placeholderId=${param.placeholderId}";
					document.getElementById("portlet_ifrmMain").src =basePortletUrl;
				}
				var save = function(){
					return document.getElementById("portlet_ifrmMain").contentWindow.save();
				}
				
		</script>
	</body>
</html>